const fs = require('fs');
const path = require('path');
let dirPath = path.join(__dirname, 'dirname');
fs.rmdir(dirPath,(err)=>{
    if(err) {
        throw new Error(err)
    }else{
        console.log('文件删除成功');
    }
})